<link rel="stylesheet" type="text/css" href="http://10.222.29.162:3456/css/layout.css" />
<link rel="stylesheet" type="text/css" href="http://10.222.29.162:3456/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="http://10.222.29.162:3456/css/bootstrap-theme.min.css" />
<link rel="stylesheet" type="text/css" href="http://10.222.29.162:3456/css/style.css" />

<style type="text/css">
	a:link {
		text-decoration: none;
	}
	a:visited {
		text-decoration: none;
	}
	a:active {
		text-decoration: none;
	}
	.table-own td {
		text-align: center;
		align: center;
	}
	.table-own tr:nth-child(even) {
		background: #d9edf7;
	}
</style>
<!--bar-->
<section ng-controller="merchantController as vm">
	<div class="view-topbar">
		<div class="topbar-console">
			<div class="tobar-head fl">
				<a href="#" class="topbar-logo fl"> <span><img src="#"
						width="20" height="20" /></span>
				</a><a a ui-sref='home' class="topbar-home-link topbar-btn text-center fl"><span>管理控制台</span></a>
			</div>
		</div>
		<div>
			<ul class="fr">
				<li class="fl topbar-info-item">
					<a href="javascript:void(0);" class="topbar-btn"> <span class="fl text-normal" name="show">欢迎:{{manager.uname}}</span>
						<div style="display:inline;margin:20px">
							<span class="label label-default" ng-click="vm.exit()">退出</span>
						</div>
						<span class="icon-arrow-down"></span>
					</a>
				</li>
			</ul>
		</div>
	</div>
	<div class="view-body">
		<div class="view-sidebar">
			<div class="sidebar-content">
				<div class="sidebar-nav" style="width: 200px;">
					<div class="sidebar-title">
						<a href="javascript:void(0);"> <span class="icon"><b
								class="fl icon-arrow-down"></b></span> <span class="text-normal">商家信息管理</span>
						</a>
					</div>
					<ul class="sidebar-trans">
						<li>
							<!-- all merchant page -->
							<a href="" ng-click="vm.findAllMerchantList()"> <b class="sidebar-icon"></b> <span class="text-normal"><span class="label label-warning" ng-model="newRegister">{{newRegister}}</span>全部商家</span>
							</a>
						</li>
						<li>
							<!-- status is 0 -->
							<a href="" ng-click="vm.findMerchantListByStatus(0)">
								<b class="sidebar-icon"></b> <span class="text-normal">未激活商家</span>
							</a>
							<a href="" ng-click="vm.findMerchantListByStatus(1)">
								<b class="sidebar-icon"></b> <span class="text-normal">正常商家</span>
							</a>
							<a href="" ng-click="vm.findMerchantListByStatus(2)">
								<b class="sidebar-icon"></b> <span class="text-normal">已拉黑商家</span>
							</a>
							<a href="" ng-click="vm.findMerchantListByStatus(3)">
								<b class="sidebar-icon"></b> <span class="text-normal">已驳回商家</span>
							</a>
						</li>
					</ul>
				</div>
				<div class="sidebar-nav" style="width: 200px;">
					<div class="sidebar-title">
						<a href="javascript:void(0);"> <span class="icon"><b
								class="fl icon-arrow-down"></b></span> <span class="text-normal">广告信息管理</span>
						</a>
					</div>
					<ul class="sidebar-trans">
						<li>
							<a href="javascript:void(0);"> <b class="sidebar-icon"></b> <span class="text-normal"><button type="button" class="btn btn-danger active"  id="advertCount" style="VISIBILITY: hidden"></button>待审核</span>
							</a>
						</li>
						<li>
							<a href="javascript:void(0);">
								<b class="sidebar-icon"></b> <span class="text-normal">广告位</span>
							</a>
							<a href="javascript:void(0);">
								<b class="sidebar-icon"></b> <span class="text-normal">已移除</span>
							</a>
						</li>
					</ul>
				</div>
				<div class="sidebar-nav" style="width: 200px;">
					<div class="sidebar-title">
						<a href="javascript:void(0);"> <span class="icon"><b
								class="fl icon-arrow-down"></b></span> <span class="text-normal">客户投诉管理</span>
						</a>
					</div>
					<ul class="sidebar-trans">
						<li>
							<a href="javascript:void(0);"> <b class="sidebar-icon"></b> <span class="text-normal">投诉列表</span>
							</a>
						</li>
					</ul>
				</div>

			</div>
		</div>
		<!--bar end-->

		<div style="font-size: 16px;background-color: white; width: 95%; height: 100%; float: right;">
			<div>
				<table class="table table-striped table-hover table-own" style="margin-left: 3%;">
					<tr>
						<td colspan="4" align="center" style="text-align: center;">
							<div ng-switch on="vm.status">
								<div ng-switch-when="0">
									未激活商家列表
								</div>
								<div ng-switch-when="1">
									正常商家列表
								</div>
								<div ng-switch-when="2">
									已拉黑商家列表
								</div>
								<div ng-switch-when="3">
									已驳回商家列表
								</div>
								<div ng-switch-default>
									全部商家列表
								</div>
							</div>
						</td>
					</tr>
					<tr>
						<td width="40%" align="center" style="text-align: center;">商家名字</td>
						<td width="40%" align="center" style="text-align: center;">商家地址</td>
						<td width="40%" align="center" style="text-align: center;">状态</td>
						<td width="40%" align="center" style="text-align: center;">操作</td>
					</tr>
					<tr ng-repeat="m in vm.merchant">
						<td align="center" style="text-align: center;">
							{{m.username }}
						</td>
						<td align="center" style="text-align: center;">{{m.address }}</td>
						<td align="center" style="text-align: center;">
							<div ng-switch on="m.status">
								<div ng-switch-when="0">
									<span class="label label-default">未激活</span>
								</div>
								<div ng-switch-when="1">
									<span class="label label-success">正常</span>
								</div>
								<div ng-switch-when="2">
									<span class="label label-warning">拉黑</span>
								</div>
								<div ng-switch-when="3">
									<span class="label label-info">驳回</span>
								</div>
								<div ng-switch-default>
								</div>
							</div>
						</td>
						<td style="text-align: center;">
							<button class="btn btn-primary" name="detail" ng-click="vm.openMerchantModal(m)">查看详情</button>
						</td>
					</tr>
				</table>
			</div>
		</div>
</section>